diff options
| author | Adam Soltys <[email protected]> | 2023-12-20 15:06:00 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-12-20 15:06:00 -0800 |
| commit | b419ccffd45add72259f4abe548ad29b61309488 (patch) | |
| tree | 42b99083b5c70ca14727a16010fd9caa7562e3bc /src/routes/(app)/[username]/invoice | |
| parent | 4cb3b467486456b53c956da95cdc0d17c3e6ff24 (diff) | |
| download | coinos-ui-b419ccffd45add72259f4abe548ad29b61309488.tar.gz coinos-ui-b419ccffd45add72259f4abe548ad29b61309488.zip | |
prettier
Diffstat (limited to 'src/routes/(app)/[username]/invoice')
3 files changed, 20 insertions, 24 deletions
diff --git a/src/routes/(app)/[username]/invoice/[id]/+layout.server.js b/src/routes/(app)/[username]/invoice/[id]/+layout.server.js index b887d407..c69da78a 100644 --- a/src/routes/(app)/[username]/invoice/[id]/+layout.server.js +++ b/src/routes/(app)/[username]/invoice/[id]/+layout.server.js @@ -27,10 +27,10 @@ export async function load({ depends, params, url, parent }) { (amount > 0 && (pending >= amount || received >= amount)); if (paid && !url.pathname.endsWith("paid")) { redirect( - 307, - `/${params.username}/invoice/${id}/paid` + - (options ? "?options=true" : "") - ); + 307, + `/${params.username}/invoice/${id}/paid` + + (options ? "?options=true" : "") + ); } let sm = Qr.drawImg(invoice.text || "", { size: 300 }); diff --git a/src/routes/(app)/[username]/invoice/[id]/+page.svelte b/src/routes/(app)/[username]/invoice/[id]/+page.svelte index 13c75fca..0ff1c21c 100644 --- a/src/routes/(app)/[username]/invoice/[id]/+page.svelte +++ b/src/routes/(app)/[username]/invoice/[id]/+page.svelte @@ -130,13 +130,17 @@ class="rounded-full border py-2 px-4 font-bold hover:opacity-80 w-full" class:bg-black={type === types.lightning} class:text-white={type === types.lightning} - on:click={toggleType}> ⚡️ Lightning </button> + on:click={toggleType} + > + ⚡️ Lightning + </button> <button class="rounded-full border py-2 px-4 font-bold hover:opacity-80 w-full flex justify-center" class:bg-black={type === types.bitcoin} class:text-white={type === types.bitcoin} - on:click={toggleType}> + on:click={toggleType} + > <img src="/images/bitcoin.svg" class="my-auto w-8 border-4 border-transparent" @@ -151,7 +155,8 @@ <a href={invoice.type === "bitcoin" ? invoice.text - : "lightning:" + invoice.text}> + : "lightning:" + invoice.text} + > <div class="relative flex"> <div class="flex mx-auto w-[360px] h-[360px]"> <img @@ -203,7 +208,8 @@ <div class="w-full flex justify-center gap-2 flex-wrap"> <a href={link} class="w-full md:w-auto"> <button - class="w-full md:w-auto flex justify-center rounded-full border py-3 px-5 hover:opacity-80"> + class="w-full md:w-auto flex justify-center rounded-full border py-3 px-5 hover:opacity-80" + > <Icon icon="mobile" style="mr-1 w-6" /> <div class="text-secondary">{$t("payments.openLink")}</div> </button> @@ -211,18 +217,16 @@ <button class="flex rounded-full justify-center border py-3 px-5 hover:opacity-80 w-full md:w-auto" - on:click={() => copy(txt)}> - - + on:click={() => copy(txt)} + > <Icon icon="copy" style="mr-1" /> <div class="text-secondary">{$t("payments.copyText")}</div></button > <button class="w-full md:w-auto flex justify-center rounded-full border py-3 px-5 hover:opacity-80" - on:click={() => (showQr = !showQr)}> - - + on:click={() => (showQr = !showQr)} + > <Icon icon="qr" style="mr-1 invert" /> <div class="text-secondary"> {showQr ? $t("payments.hide") : $t("payments.show")} diff --git a/src/routes/(app)/[username]/invoice/[id]/paid/+page.svelte b/src/routes/(app)/[username]/invoice/[id]/paid/+page.svelte index bc974b9a..9740dc92 100644 --- a/src/routes/(app)/[username]/invoice/[id]/paid/+page.svelte +++ b/src/routes/(app)/[username]/invoice/[id]/paid/+page.svelte @@ -9,16 +9,8 @@ export let data; let amount, currency, rate, received, pending, tip, user, id; $: data && - ({ - amount, - currency, - rate, - received, - pending, - tip, - user, - id, - } = data.invoice); + ({ amount, currency, rate, received, pending, tip, user, id } = + data.invoice); toast.pop(0); </script> |
